import request from '@/utils/request'

// 导出
export function exportForm(query) {
    return request({
      url: '/process/register/export',
      method: 'get',
      params: query
    })
  }
  export function exportAnalysis(query) {
    return request({
      url: '/process/analyze/export',
      method: 'get',
      params: query
    })
  }
  export function exportBuildHouse(query) {
    return request({
      url: '/process/build/export',
      method: 'get',
      params: query
    })
  }
  export function exportEntryHouse(query) {
    return request({
      url: '/process/input/export',
      method: 'get',
      params: query
    })
  }
  export function exportExtract(query) {
    return request({
      url: '/process/extract/export',
      method: 'get',
      params: query
    })
  }
  export function exportSequence(query) {
    return request({
      url: '/process/sequencing/export',
      method: 'get',
      params: query
    })
  }
  // 扫码登记列表
  export function registerList(query) {
    return request({
      url: '/process/register/list',
      method: 'get',
      params: query
    })
  }
  export function deleteRegisterList(ids) {
    return request({
      url: '/process/register/removeRegister/'+ids,
      method: 'delete',
    })
  }
  export function aRegisterList(ids) {
    return request({
      url: '/process/register/'+ids,
      method: 'get',
    })
  }
  export function addRegisterList(data) {
    return request({
      url: '/process/register/addManually',
      method: 'post',
      data
    })
  }
  export function editRegisterList(data) {
    return request({
      url: '/process/register/updateRegister',
      method: 'put',
      data
    })
  }
  export function registration(data) {
    return request({
      url: '/process/register/entryRegistration',
      method: 'post',
      data
    })
  }
  export function cancelRegister(ids) {
    return request({
      url: '/process/register/cancel/'+ids,
      method: 'post',
    })
  }
  // 作废
  export function toVoid(data) {
    return request({
      url: '/process/register/toVoid',
      method: 'post',
      data
    })
  }
    // 获取LRP
  export function getLRPbyCode(params) {
    return request({
      url: '/process/register/getLrpData',
      method: 'get',
      params
    })
  }
  export function submitLRP(data) {
    return request({
      url: '/process/register/addLrpDateRegister',
      method: 'post',
      data
    })
  }
  // 对照
  export function LRPcompare(data) {
    return request({
      url: '/process/register/lrpCompare',
      method: 'post',
      data
    })
  }



  // 入库列表
  export function entryHouseList(params) {
    return request({
      url: '/process/input/list',
      method: 'get',
      params
    })
  }
  export function entryHouse(data) {
    return request({
      url: '/process/input/putInStorage',
      method: 'post',
      data
    })
  }
  export function entryHouseEdit(data) {
    return request({
      url: '/process/input',
      method: 'put',
      data
    })
  }
  export function cancelEntryHouse(ids) {
    return request({
      url: '/process/input/cancel/'+ids,
      method: 'post',
    })
  }
  export function inputToVoid(data) {
    return request({
      url: '/process/input/toVoid',
      method: 'post',
      data
    })
  }

// 提取列表
  export function extractList(params) {
    return request({
      url: '/process/extract/list',
      method: 'get',
      params
    })
  }
  export function extractTemplate() {
    return request({
      url: '/process/extract/exportTemplate',
      method: 'get',
    })
  }
  export function extractEdit(data) {
    return request({
      url: '/process/extract',
      method: 'put',
      data
    })
  }
  export function ReExtract(data) {
    return request({
      url: '/process/extract/reExtraction',
      method: 'post',
      data
    })
  }
  export function returnApply(data) {
    return request({
      url: '/process/state/flowBack',
      method: 'post',
      data
    })
  }
  export function sureToExtract(data) {
    return request({
      url: '/process/extract/toExtract',
      method: 'post',
      data
    })
  }
  export function cancelToExtract(ids) {
    return request({
      url: '/process/extract/cancel/'+ids,
      method: 'post',
    })
  }
  export function extractToVoid(data) {
    return request({
      url: '/process/extract/toVoid',
      method: 'post',
      data
    })
  }
  export function extractDel(ids) {
    return request({
      url: '/process/extract/'+ids,
      method: 'delete',
    })
  }
  export function extractSubmitExcel(data) {
    return request({
      url: '/process/extract/importData',
      method: 'post',
      data
    })
  }

 

  // 建库列表
  export function buildHouseList(params) {
    return request({
      url: '/process/build/list',
      method: 'get',
      params
    })
  }
  export function buildHouseEdit(data) {
    return request({
      url: '/process/build',
      method: 'put',
      data
    })
  }
  export function cancelBuildHouse(ids) {
    return request({
      url: '/process/build/cancel/'+ids,
      method: 'post',
    })
  }
  export function exportBuildHouseTemplate(params) {
    return request({
      url: '/process/build/exportTemplate',
      method: 'get',
      params
    })
  }
  export function submitBuildHouseExcel(data) {
    return request({
      url: '/process/build/importData',
      method: 'post',
      data
    })
  }
  export function reBuildHouse(data) {
    return request({
      url: '/process/build/reBuild',
      method: 'post',
      data
    })
  }
  export function sureToBuildHouse(data) {
    return request({
      url: '/process/build/toBuild',
      method: 'post',
      data
    })
  }
  export function buildHouseToVoid(data) {
    return request({
      url: '/process/build/toVoid',
      method: 'post',
      data
    })
  }
  export function delBuildHouse(ids) {
    return request({
      url: '/process/build/'+ids,
      method: 'delete',
    })
  }

  // 测序列表
  export function sequenceList(params) {
    return request({
      url: '/process/sequencing/list',
      method: 'get',
      params
    })
  }
  export function sequenceEdit(data) {
    return request({
      url: '/process/sequencing',
      method: 'put',
      data
    })
  }
  export function reSequence(data) {
    return request({
      url: '/process/sequencing/reSequencing',
      method: 'post',
      data
    })
  }
  export function cancelSequence(ids) {
    return request({
      url: '/process/sequencing/cancel/'+ids,
      method: 'post',
    })
  }
  export function submitSequenceExcel(data) {
    return request({
      url: '/process/sequencing/importData',
      method: 'post',
      data
    })
  }
  export function exportSequenceTemplate(params) {
    return request({
      url: '/process/sequencing/exportTemplate',
      method: 'get',
      params
    })
  }
  export function sureToSequence(data) {
    return request({
      url: '/process/sequencing/toSequencing',
      method: 'post',
      data
    })
  }
  export function sequenceToVoid(data) {
    return request({
      url: '/process/sequencing/toVoid',
      method: 'post',
      data
    })
  }
  export function sequenceDel(ids) {
    return request({
      url: '/process/sequencing/'+ids,
      method: 'delete',
    })
  }
 

  // 分析列表
  export function analysisList(params) {
    return request({
      url: '/process/analyze/list',
      method: 'get',
      params
    })
  }
  export function analyzeToVoid(data) {
    return request({
      url: '/process/analyze/toVoid',
      method: 'post',
      data
    })
  }
  export function goAnalysis(ids) {
    return request({
      url: '/process/analyze/analyze/'+ids,
      method: 'post',
      
    })
  }
  export function reAnalysis(ids) {
    return request({
      url: '/process/analyze/reAnalyze/'+ids,
      method: 'post',
      
    })
  }
  export function stopAnalysis(ids) {
    return request({
      url: '/process/analyze/terminate/'+ids,
      method: 'post',   
    })
  }
  export function saveHost(data) {
    return request({
      url: '/process/analyze/saveHost',
      method: 'post',
      data
    })
  }
  export function cancelAnalysis(ids) {
    return request({
      url: `/process/analyze/cancel/${ids}`,
      method: 'post',   
    })
  }

  

  // 技术字典列表
  export function getDictTechnicalFields(fieldCategory){
    return request({
      url:'/dict/dictTechnicalField/getDictTechnicalFields/'+fieldCategory,
      method:'get',
    })
  }
//  作废启用
export function inputEnabled(data) {
  return request({
    url: '/process/input/toEnabled',
    method: 'post',
    data
  })
}
export function analysisEnabled(data) {
  return request({
    url: '/process/analyze/toEnabled',
    method: 'post',
    data
  })
}
export function buildEnabled(data) {
  return request({
    url: '/process/build/toEnabled',
    method: 'post',
    data
  })
}
export function extractEnabled(data) {
  return request({
    url: '/process/extract/toEnabled',
    method: 'post',
    data
  })
}
export function sequenceEnabled(data) {
  return request({
    url: '/process/sequencing/toEnabled',
    method: 'post',
    data
  })
}
export function registerEnabled(data) {
  return request({
    url: '/process/register/toEnabled',
    method: 'post',
    data
  })
}